package com.example.taluo.entity.dto;

/*** @Author supersaiya
 * @Description TODO

 * @Date 2025/2/15 17:14

 * @Version 1.0*/

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

/**
 * 房间创建的数据传输对象
 */
public class RoomCreateDTO {

    /**
     * 房间密码
     */
    private String password;

    /**
     * 房间最大玩家数（默认为2，范围为2-4）
     */
    @NotNull(message = "最大玩家数不能为空")
    @Min(value = 2, message = "最大玩家数不能小于2")
    @Max(value = 4, message = "最大玩家数不能超过4")
    private Short maxPlayers;

    // Getters and Setters
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Short getMaxPlayers() {
        return maxPlayers;
    }

    public void setMaxPlayers(Short maxPlayers) {
        this.maxPlayers = maxPlayers;
    }
}